<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>合同费用条款管理</title>
    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/channel.css?v=4.1.0" rel="stylesheet">
    <!-- Sweet Alert -->
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>
      .actionA{
        margin-right: 5px;
      }
    </style>
</head>

<body class="white-bg" style="padding: 3px;font-size: 13px">
    <div class="page-heade">
        <h2 class="title_color text-center">合同费用条款管理</h2>
    </div>
    <form action="" class="form-inline" id="form1">
        <table class="table table-bordered bud_hei">
            <tr>
                <td colspan="6">
                  <a class="btn btn-sm btn-primary" href="{:url('Contractcostterms/contractfreecase')}" id="addContractFree">添加合同费用条款</a>



                  <a href="javascript:;" class="btn btn-sm btn-primary" id="exportContract">导出合同Excel</a>
                  <a href="{:url('Other/lendcontract')}" class="btn btn-sm btn-primary" id="lendContract">导入合同</a>
                  <a href="javascript:;" class="btn btn-sm btn-primary" id="exportAgency">导出经销商Excel</a>
                  <a href="{:url('Other/lendangency')}" class="btn btn-sm btn-primary" id="lendAngency">导入经销商</a>
                </td>
            </tr>
            <tr>
                <td style="width: 140px" class="text-right">合同费用条款编号：</td>
                <td>
                    <input type="text" name="termsNo" class="form-control">
                </td>
                <td style="width: 140px" class="text-right">合同费用条款名称：</td>
                <td><input type="text" name="termsName" class="form-control"></td>
                <td class="text-right" style="width: 120px">经销商编号：</td>
               <td><input type="text" name="" class="form-control"></td>
            </tr>
            <tr>
               <td class="text-right" style="width: 140px">经销商名称：</td>
               <td><input type="text" name="" class="form-control"></td>
                <td class="text-right" style="width: 140px">合同周期：</td>
                <td>
                    <div class="form-group">
                        <input type="text" id="start" class="form-control layer-date " style="min-width:120px;width:120px;display: inline-block;" name="start" autocomplete="off">
                    </div>
                    <div class="form-group">
                        至
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control layer-date" style="min-width:120px;width:120px;display: inline-block;" id="end" name="end" autocomplete="off">
                    </div>
                </td>
                <td colspan="2"></td>
            </tr>
            <tr>
                <td colspan="6" class="text-center">
                    <button class="btn-sm btn-info btn">查询</button><span class="lr_5"></span><button class="btn-sm btn-info btn" type="reset" id="reset">清空查询条件</button>
                </td>
            </tr>
        </table>
    </form>
    <table class="table table-striped table-bordered table-hover bud_hei text-center aprovalSystemTable" style="width: 100%;">
        <tr class="info">
            <th class="text-center">No.</th>
            <th class="text-center">合同费用条款编号</th>
            <th class="text-center" style="width: 260px">合同费用条款名称</th>
            <th class="text-center">合同周期</th>
            <th class="text-center">包含经销商数</th>
            <th class="text-center">创建人</th>
            <th class="text-center">创建时间</th>
            <th class="text-center">最后修改人</th>
            <th class="text-center">最后修改时间</th>
            <th class="text-center">操作</th>
        </tr>
        <tbody>
        {volist name="data" id="list"}
           <tr>
               <td>{$i}</td>
               <td class="text-left">{$list.termsNo}</td>
               <td class="text-left">{$list.termsName}</td>
               <td class="text-left">{$list.startDate}至{$list.endDate}</td>
               <td>{$list.num}</td>
               <td>{$list.cusername}</td>
               <td>{$list.ctime}</td>
               <td>{$list.pusername}</td>
               <td>{$list.ptime}</td>
               <td>
                <a href="{:url('Contractcostterms/contractfreecase')}?id={$list.id}"class="actionA">修改</a>
                <a href="{:url('Contractcostterms/updateview',array('id'=>$list.id))}" class="actionA">维护经销商</a>
                <a href="{:url('Contractcostterms/maintenanceclause')}?id={$list.id}" class="actionA">维护费用条款</a>
                <!--<a href="{:url('Contractcostterms/maintenanceclause')}?id={$list.id}" class="actionA">维护费用条款</a>-->
                <a href="{:url('Contractcostterms/del')}?id={$list.id}" class="actionA">删除</a>
               </td>
           </tr>
        {/volist}
           </tbody>
    </table>
    <h5 class="text-center"  style="font-size: 13px;font-weight: 500">
                    总共有12条记录，第1/2页,当前页<input id="page" type="text"  style="width: 40px" value="1"/><span id="gopage">Go</span>&nbsp;&nbsp;<span id="fistpage">首页</span>&nbsp;&nbsp;
                    每页显示
                    <select id="pagesize">
                        <option value='10' selected>10条</option>
                        <option value='15'>15条</option>
                        <option value='20'>20条</option>

                    </select>
                </h5>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js"></script>
    <script src="__STATIC__/layout/js/contabs_sub.js"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- Sweet alert -->
    <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
    <script src="__STATIC__/layout/js/contabs_sub.js"></script>
     <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
     <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>

    <script>
    $(function() {
        $('body').on('click', 'input[type=text]', function() {
            this.select()
        })
    })
   
    /*日期范围限制*/
    var start = {
        elem: '#start',
        format: 'YYYY/MM/DD',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function(datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY/MM/DD',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function(datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
    $(document).ready(function() {

        $('#reset').on('click', function() {
            $("#form1 input").each(function() {
                $(this).val('');
            });
            $("#form1 select").each(function() {
                $(this).val('');
            });
            $('#form1').submit()
            return false
        })
    })

    /*$("#addContractFree").click(function() {
        layer.open({
            type: 2,
            title: '新增合同费用条款',
            area: ['800px', '500px'],
            fixed: false, //不固定
            maxmin: true,
            //content: "{:url('Other/contractfreecase')}"
            content: "{:url('Contractcostterms/contractfreecase')}"
        });
        return false

    })*/

    function MaintenanceClause(){

    }
    </script>
</body>

</html>